//index.js
//获取应用实例
const app = getApp()
const config = getApp().globalData.config

Page({
  data: {
    indicatorDots: true,
    indicatorColor:"#fff",
    indicatorActive: "#fff",
    vertical: false,
    autoplay: false,
    interval: 2000,
    duration: 500,
    swipeList:[{
      specialList: [{
        id: 1,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }, {
        id: 2,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }, {
        id: 1,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }, {
        id: 2,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }, {
        id: 1,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }, {
        id: 2,
        productName: "【限时秒杀包邮】360度全解世界",
        pictures: "../../img/p_01.jpg",
        price: "299.00"
      }]
    },
      {
        specialList: [{
          id: 1,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }, {
          id: 2,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }, {
          id: 1,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }, {
          id: 2,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }, {
          id: 1,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }, {
          id: 2,
          productName: "【限时秒杀包邮】360度全解世界",
          pictures: "../../img/p_02.jpg",
          price: "299.00"
        }]
      }
    ],
    allList: [{
      id: 1,
      productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
      pictures: "../../img/p_03.jpg",
      price: "299.00"
    }, {
      id: 2,
        productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
        pictures: "../../img/p_03.jpg",
      price: "299.00"
    }, {
      id: 1,
        productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
        pictures: "../../img/p_03.jpg",
      price: "299.00"
    }, {
      id: 2,
        productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
        pictures: "../../img/p_03.jpg",
      price: "299.00"
    }, {
      id: 1,
        productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
        pictures: "../../img/p_03.jpg",
      price: "299.00"
    }, {
      id: 2,
        productName: "OSA白色v领雪纺衫半袖上衣女2020夏季新款时尚气质遮肚子小衫洋气",
        pictures: "../../img/p_03.jpg",
      price: "299.00"
    }]
    
  },
  changeIndicatorDots() {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },

  changeAutoplay() {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },

  intervalChange(e) {
    this.setData({
      interval: e.detail.value
    })
  },

  durationChange(e) {
    this.setData({
      duration: e.detail.value
    })
  },
  toProductDetails(e) { // 跳转页面
  console.log(e.currentTarget)
    wx.navigateTo({
      url: `/pages/productDetails/productDetails?id=${e.currentTarget.dataset.uid}`,
    })
  },
})
